home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
nihcl-30.lha
/
nihcl-3.0
/
lib
/
Dictionary.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-05-19
|
2KB
|
68 lines
#ifndef DICTIONARY_H
#define DICTIONARY_H
/*$Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/lib/RCS/Dictionary.h,v 3.0 90/05/20 00:19:27 kgorlen Rel $*/
/* Dictionary.h -- declarations for Set of Associations
THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A
"UNITED STATES GOVERNMENT WORK". IT WAS WRITTEN AS A PART OF THE
AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE. THIS MEANS IT
CANNOT BE COPYRIGHTED. THIS SOFTWARE IS FREELY AVAILABLE TO THE
PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO
RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY.
Author:
K. E. Gorlen
Computer Systems Laboratory, DCRT
National Institutes of Health
Bethesda, MD 20892
$Log: Dictionary.h,v $
* Revision 3.0 90/05/20 00:19:27 kgorlen
* Release for 1st edition.
*
*/
#include "Set.h"
class Assoc;
class LookupKey;
class OrderedCltn;
class Dictionary: public Set {
DECLARE_MEMBERS(Dictionary);
#ifndef BUG_38
// internal <<AT&T C++ Translator 2.00 06/30/89>> error: bus error (or something nasty like that)
protected: // storer() functions for object I/O
virtual void storer(OIOofd& fd) const { Set::storer(fd); };
virtual void storer(OIOout& strm) const { Set::storer(strm); };
#endif
public:
Dictionary(unsigned size =DEFAULT_CAPACITY);
void operator=(const Dictionary&);
bool operator==(const Dictionary&) const;
bool operator!=(const Dictionary& d) const { return !(*this == d); }
virtual Object* add(Object&);
virtual Assoc* addAssoc(Object& key, Object& value);
virtual Collection& addContentsTo(Collection&) const;
virtual Collection& addKeysTo(Collection&) const;
virtual Collection& addValuesTo(Collection&) const;
virtual LookupKey* assocAt(const Object& key) const;
virtual Object* atKey(const Object& key) const;
virtual Object* atKey(const Object& key, Object& newValue);
virtual bool includesAssoc(const LookupKey& asc) const;
virtual bool includesKey(const Object& key) const;
virtual bool isEqual(const Object&) const;
virtual Object* keyAtValue(const Object& val) const;
virtual unsigned occurrencesOf(const Object& val) const;
virtual Object* remove(const Object& asc);
virtual LookupKey* removeAssoc(const LookupKey& asc);
virtual LookupKey* removeKey(const Object& key);
virtual const Class* species() const;
private: // shouldNotImplement()
virtual int compare(const Object&) const;
};
#endif